import HomeView from "/src/views/Home/index.vue";
// import D3 from "@/views/Home/d3-canvas.vue";
import { createRouter, createWebHistory } from "vue-router";

const router = createRouter({
  history: createWebHistory(),
  routes: [
    {
      path: "/",
      name: "home",
      meta: {
        keepAlive: false,
        public: false, // 是否公开页面（不需要登录）
        nav: true,
        first: true, //判断是否为1级页面
        identity: false,
        title: "echarts",
      },
      component: HomeView,
    },
    // {
    //   path: "/d3",
    //   name: "d3",
    //   meta: {
    //     keepAlive: false,
    //     public: false, // 是否公开页面（不需要登录）
    //     nav: true,
    //     first: true, //判断是否为1级页面
    //     identity: false,
    //     title: "d3",
    //   },
    //   component: D3,
    // },
  ],
});

router.beforeEach(async (to, from, next) => {
  next();
});

router.afterEach((to, from, failure) => {});

export default router;
